#include <gmlib/sm2/internal/sm2p256v1.h>
#include <stdexcept>
#include <cstring>

using namespace sm2::internal;

void test_sm2_fp_dbl()
{
    sm2_fp_t    a, c;
    std::uint8_t c_data[32];

    static std::uint8_t a0[32] = {0x14,0xc9,0xf4,0x32,0x1c,0x5b,0x76,0xa7,0x3b,0x44,0xed,0x75,0x7f,0x10,0x8f,0x90,0x74,0xeb,0xf8,0x7d,0x27,0x6e,0xb8,0x0b,0xe7,0xa7,0x9f,0xec,0xa0,0x6b,0x9a,0x04};
    static std::uint8_t c0[32] = {0x29,0x93,0xe8,0x64,0x38,0xb6,0xed,0x4e,0x76,0x89,0xda,0xea,0xfe,0x21,0x1f,0x20,0xe9,0xd7,0xf0,0xfa,0x4e,0xdd,0x70,0x17,0xcf,0x4f,0x3f,0xd9,0x40,0xd7,0x34,0x08};
    sm2_fp_from_bytes(a, a0);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c0, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a1[32] = {0x68,0x2f,0x09,0x75,0xa5,0x37,0x9b,0x82,0xe8,0xbd,0xc8,0xca,0xc7,0x15,0x17,0xd5,0x00,0x60,0xbd,0xd5,0xe1,0x9b,0x2a,0x3f,0x94,0x48,0x71,0x44,0xee,0xc5,0xa8,0x71};
    static std::uint8_t c1[32] = {0xd0,0x5e,0x12,0xeb,0x4a,0x6f,0x37,0x05,0xd1,0x7b,0x91,0x95,0x8e,0x2a,0x2f,0xaa,0x00,0xc1,0x7b,0xab,0xc3,0x36,0x54,0x7f,0x28,0x90,0xe2,0x89,0xdd,0x8b,0x50,0xe2};
    sm2_fp_from_bytes(a, a1);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c1, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a2[32] = {0x0e,0x94,0xdf,0xc4,0x41,0xc7,0xfd,0x5e,0x19,0x39,0x51,0xdd,0x21,0x09,0xb3,0x4d,0x6e,0xd5,0x3f,0xea,0x3a,0x07,0x9d,0xa6,0x4d,0x56,0x31,0x68,0xea,0xbc,0xce,0x45};
    static std::uint8_t c2[32] = {0x1d,0x29,0xbf,0x88,0x83,0x8f,0xfa,0xbc,0x32,0x72,0xa3,0xba,0x42,0x13,0x66,0x9a,0xdd,0xaa,0x7f,0xd4,0x74,0x0f,0x3b,0x4c,0x9a,0xac,0x62,0xd1,0xd5,0x79,0x9c,0x8a};
    sm2_fp_from_bytes(a, a2);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c2, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a3[32] = {0x17,0x16,0x17,0xd9,0x80,0x3f,0x6f,0x6d,0xba,0x90,0x71,0xf4,0x0f,0x22,0xa7,0xeb,0x79,0x33,0x98,0xf1,0x2b,0x37,0x1a,0x54,0x96,0x99,0xb5,0x81,0x00,0xdd,0x8f,0xb6};
    static std::uint8_t c3[32] = {0x2e,0x2c,0x2f,0xb3,0x00,0x7e,0xde,0xdb,0x75,0x20,0xe3,0xe8,0x1e,0x45,0x4f,0xd6,0xf2,0x67,0x31,0xe2,0x56,0x6e,0x34,0xa9,0x2d,0x33,0x6b,0x02,0x01,0xbb,0x1f,0x6c};
    sm2_fp_from_bytes(a, a3);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c3, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a4[32] = {0x41,0xe5,0x40,0x18,0x47,0xc2,0xa0,0x1c,0x67,0x1a,0x29,0xc7,0x83,0xa0,0x18,0x22,0xc2,0xa0,0x46,0x47,0x26,0x79,0x6e,0xc5,0x06,0x47,0xc5,0x6d,0xd6,0xf8,0x4c,0xd0};
    static std::uint8_t c4[32] = {0x83,0xca,0x80,0x30,0x8f,0x85,0x40,0x38,0xce,0x34,0x53,0x8f,0x07,0x40,0x30,0x45,0x85,0x40,0x8c,0x8e,0x4c,0xf2,0xdd,0x8a,0x0c,0x8f,0x8a,0xdb,0xad,0xf0,0x99,0xa0};
    sm2_fp_from_bytes(a, a4);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c4, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a5[32] = {0xb1,0xba,0x20,0x78,0x08,0xa5,0x55,0xc0,0xfd,0xfb,0x8c,0x50,0x34,0x9d,0x55,0x8d,0x6f,0xa3,0x13,0x23,0x4b,0x16,0xd2,0x9a,0x26,0x38,0xff,0x67,0x05,0x88,0xdb,0x8c};
    static std::uint8_t c5[32] = {0x63,0x74,0x40,0xf1,0x11,0x4a,0xab,0x81,0xfb,0xf7,0x18,0xa0,0x69,0x3a,0xab,0x1a,0xdf,0x46,0x26,0x47,0x96,0x2d,0xa5,0x33,0x4c,0x71,0xfe,0xce,0x0b,0x11,0xb7,0x19};
    sm2_fp_from_bytes(a, a5);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c5, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a6[32] = {0x58,0x8c,0xd1,0xde,0xae,0x75,0xd3,0x11,0x0b,0x94,0x94,0x39,0x48,0xfd,0x0a,0xe3,0xeb,0x16,0x48,0x68,0xc2,0x5f,0xd6,0xef,0xaf,0x07,0xf3,0x30,0x80,0x80,0xbf,0xa6};
    static std::uint8_t c6[32] = {0xb1,0x19,0xa3,0xbd,0x5c,0xeb,0xa6,0x22,0x17,0x29,0x28,0x72,0x91,0xfa,0x15,0xc7,0xd6,0x2c,0x90,0xd1,0x84,0xbf,0xad,0xdf,0x5e,0x0f,0xe6,0x61,0x01,0x01,0x7f,0x4c};
    sm2_fp_from_bytes(a, a6);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c6, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a7[32] = {0xe1,0x30,0xf1,0xee,0xa2,0x9c,0xa4,0x1b,0x47,0x15,0x62,0xdd,0xa0,0x31,0x86,0xde,0x93,0x31,0x36,0xaf,0xdc,0x99,0x04,0x81,0xa8,0xd8,0x74,0x3d,0x68,0x15,0x9e,0xa2};
    static std::uint8_t c7[32] = {0xc2,0x61,0xe3,0xde,0x45,0x39,0x48,0x36,0x8e,0x2a,0xc5,0xbb,0x40,0x63,0x0d,0xbd,0x26,0x62,0x6d,0x60,0xb9,0x32,0x09,0x02,0x51,0xb0,0xe8,0x7a,0xd0,0x2b,0x3d,0x45};
    sm2_fp_from_bytes(a, a7);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c7, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a8[32] = {0x79,0x0e,0x7e,0x0d,0x6c,0x59,0xf5,0x19,0xed,0xb3,0x0f,0x68,0x23,0xae,0x75,0x57,0x21,0x2b,0x4d,0xed,0x0d,0xfe,0x26,0x8a,0x1e,0xbb,0xbd,0x5a,0x05,0xd2,0x7b,0x64};
    static std::uint8_t c8[32] = {0xf2,0x1c,0xfc,0x1a,0xd8,0xb3,0xea,0x33,0xdb,0x66,0x1e,0xd0,0x47,0x5c,0xea,0xae,0x42,0x56,0x9b,0xda,0x1b,0xfc,0x4d,0x14,0x3d,0x77,0x7a,0xb4,0x0b,0xa4,0xf6,0xc8};
    sm2_fp_from_bytes(a, a8);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c8, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a9[32] = {0xa8,0x02,0xb6,0xd4,0x97,0x13,0x55,0x1b,0x52,0x06,0x1b,0x47,0xb9,0xf3,0x13,0x76,0x9d,0xa0,0x0f,0x73,0x4d,0x35,0xae,0xa8,0x0a,0x31,0xbb,0xe3,0x58,0xb7,0x9c,0xdb};
    static std::uint8_t c9[32] = {0x50,0x05,0x6d,0xaa,0x2e,0x26,0xaa,0x36,0xa4,0x0c,0x36,0x8f,0x73,0xe6,0x26,0xed,0x3b,0x40,0x1e,0xe7,0x9a,0x6b,0x5d,0x4f,0x14,0x63,0x77,0xc6,0xb1,0x6f,0x39,0xb7};
    sm2_fp_from_bytes(a, a9);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c9, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a10[32] = {0xbc,0xa3,0x41,0x5f,0x28,0x9a,0x14,0x19,0xe2,0x3f,0x91,0x95,0xb5,0x07,0xda,0x20,0x8d,0x9f,0x19,0xc8,0x44,0xfb,0x09,0x17,0x59,0xf6,0xfc,0x01,0x90,0x63,0xba,0xa6};
    static std::uint8_t c10[32] = {0x79,0x46,0x82,0xbf,0x51,0x34,0x28,0x33,0xc4,0x7f,0x23,0x2b,0x6a,0x0f,0xb4,0x41,0x1b,0x3e,0x33,0x91,0x89,0xf6,0x12,0x2d,0xb3,0xed,0xf8,0x03,0x20,0xc7,0x75,0x4d};
    sm2_fp_from_bytes(a, a10);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c10, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a11[32] = {0x77,0xd9,0x13,0xea,0x71,0x8b,0x58,0x10,0xc0,0xf5,0xe7,0xe8,0x20,0x4c,0x02,0x4b,0x04,0xed,0xe2,0xe7,0xc1,0x29,0x83,0xfb,0xd4,0xa3,0x9a,0x29,0x78,0xea,0xcb,0x80};
    static std::uint8_t c11[32] = {0xef,0xb2,0x27,0xd4,0xe3,0x16,0xb0,0x21,0x81,0xeb,0xcf,0xd0,0x40,0x98,0x04,0x96,0x09,0xdb,0xc5,0xcf,0x82,0x53,0x07,0xf7,0xa9,0x47,0x34,0x52,0xf1,0xd5,0x97,0x00};
    sm2_fp_from_bytes(a, a11);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c11, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a12[32] = {0x71,0x25,0x7a,0xea,0xb0,0xca,0x7f,0x48,0xf7,0x38,0xec,0xad,0x12,0x1d,0xab,0x2e,0x2f,0x65,0xd0,0xf9,0xe2,0x2b,0x82,0xbe,0x4c,0x0f,0x75,0x00,0x16,0x91,0x7d,0xed};
    static std::uint8_t c12[32] = {0xe2,0x4a,0xf5,0xd5,0x61,0x94,0xfe,0x91,0xee,0x71,0xd9,0x5a,0x24,0x3b,0x56,0x5c,0x5e,0xcb,0xa1,0xf3,0xc4,0x57,0x05,0x7c,0x98,0x1e,0xea,0x00,0x2d,0x22,0xfb,0xda};
    sm2_fp_from_bytes(a, a12);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c12, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a13[32] = {0x61,0xd2,0xf9,0x8b,0x26,0x16,0xa3,0x2f,0xa2,0x70,0x17,0xbe,0x3e,0x5b,0xea,0x50,0x96,0x4c,0x17,0x68,0x4c,0x91,0xa1,0xbf,0x20,0xc9,0xab,0x43,0x69,0xc6,0x16,0xdb};
    static std::uint8_t c13[32] = {0xc3,0xa5,0xf3,0x16,0x4c,0x2d,0x46,0x5f,0x44,0xe0,0x2f,0x7c,0x7c,0xb7,0xd4,0xa1,0x2c,0x98,0x2e,0xd0,0x99,0x23,0x43,0x7e,0x41,0x93,0x56,0x86,0xd3,0x8c,0x2d,0xb6};
    sm2_fp_from_bytes(a, a13);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c13, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a14[32] = {0x92,0xdf,0x43,0xbf,0x0c,0x3f,0x84,0x6d,0xe4,0xae,0x33,0xf5,0xde,0x83,0xdc,0x33,0x98,0xc1,0x7d,0xa4,0x1b,0x46,0x32,0x00,0xf5,0x43,0x9f,0xf4,0xf6,0x49,0x76,0x9d};
    static std::uint8_t c14[32] = {0x25,0xbe,0x87,0x7f,0x18,0x7f,0x08,0xdb,0xc9,0x5c,0x67,0xeb,0xbd,0x07,0xb8,0x67,0x31,0x82,0xfb,0x49,0x36,0x8c,0x64,0x00,0xea,0x87,0x3f,0xe9,0xec,0x92,0xed,0x3b};
    sm2_fp_from_bytes(a, a14);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c14, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a15[32] = {0xdc,0x8d,0x2f,0x47,0x0c,0xec,0x8c,0x88,0x07,0xd5,0x97,0xaf,0x1a,0xc0,0xa1,0x23,0x81,0x90,0x34,0xea,0x86,0x11,0xa0,0x6f,0x48,0x52,0x79,0xbd,0xff,0x32,0x43,0xa6};
    static std::uint8_t c15[32] = {0xb9,0x1a,0x5e,0x8f,0x19,0xd9,0x19,0x10,0x0f,0xab,0x2f,0x5e,0x35,0x81,0x42,0x47,0x03,0x20,0x69,0xd6,0x0c,0x23,0x40,0xdd,0x90,0xa4,0xf3,0x7b,0xfe,0x64,0x87,0x4d};
    sm2_fp_from_bytes(a, a15);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c15, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a16[32] = {0x85,0x94,0x27,0xa4,0x7f,0x58,0xb7,0x81,0x53,0x60,0x45,0x2e,0xc4,0xc8,0x6f,0xd6,0x34,0x43,0x54,0x01,0x85,0x16,0xb9,0x86,0x64,0x3f,0x68,0x46,0x20,0xa1,0xf2,0x18};
    static std::uint8_t c16[32] = {0x0b,0x28,0x4f,0x49,0xfe,0xb1,0x6f,0x02,0xa6,0xc0,0x8a,0x5d,0x89,0x90,0xdf,0xac,0x68,0x86,0xa8,0x04,0x0a,0x2d,0x73,0x0b,0xc8,0x7e,0xd0,0x8c,0x41,0x43,0xe4,0x31};
    sm2_fp_from_bytes(a, a16);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c16, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a17[32] = {0xc1,0x0a,0xb9,0x42,0xf7,0xb0,0xbd,0x3e,0x17,0xe0,0x9d,0x15,0x3a,0x2d,0x1c,0x5a,0xe9,0xa8,0x2f,0xa1,0x0b,0x3f,0x23,0x34,0x46,0x1e,0xa5,0x7f,0x44,0xac,0xce,0xc6};
    static std::uint8_t c17[32] = {0x82,0x15,0x72,0x86,0xef,0x61,0x7a,0x7c,0x2f,0xc1,0x3a,0x2a,0x74,0x5a,0x38,0xb5,0xd3,0x50,0x5f,0x43,0x16,0x7e,0x46,0x67,0x8c,0x3d,0x4a,0xfe,0x89,0x59,0x9d,0x8d};
    sm2_fp_from_bytes(a, a17);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c17, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a18[32] = {0x33,0xe2,0x42,0xde,0x22,0xc1,0xfa,0x63,0xe4,0x1c,0x4a,0x36,0x34,0xc6,0x05,0xee,0x1a,0x74,0x09,0x03,0xb6,0xa0,0xa0,0x6b,0xe0,0x8d,0x40,0x5c,0x47,0x1f,0x67,0x83};
    static std::uint8_t c18[32] = {0x67,0xc4,0x85,0xbc,0x45,0x83,0xf4,0xc7,0xc8,0x38,0x94,0x6c,0x69,0x8c,0x0b,0xdc,0x34,0xe8,0x12,0x07,0x6d,0x41,0x40,0xd7,0xc1,0x1a,0x80,0xb8,0x8e,0x3e,0xcf,0x06};
    sm2_fp_from_bytes(a, a18);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c18, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a19[32] = {0xd0,0x5b,0x95,0x43,0xe9,0x5c,0xa5,0x9d,0x79,0x7d,0xa0,0x21,0x01,0xa8,0xad,0x34,0x0a,0x35,0x36,0xdf,0x5b,0xfd,0xb6,0x61,0x6f,0x07,0x30,0x98,0x5b,0xa8,0xcc,0xe9};
    static std::uint8_t c19[32] = {0xa0,0xb7,0x2a,0x88,0xd2,0xb9,0x4b,0x3a,0xf2,0xfb,0x40,0x42,0x03,0x51,0x5a,0x68,0x14,0x6a,0x6d,0xbf,0xb7,0xfb,0x6c,0xc1,0xde,0x0e,0x61,0x30,0xb7,0x51,0x99,0xd3};
    sm2_fp_from_bytes(a, a19);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c19, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a20[32] = {0x23,0x77,0xf1,0x31,0xc0,0xfd,0xcd,0xe9,0x51,0x71,0x0f,0x63,0x2c,0x98,0x9b,0x71,0x58,0x6b,0x77,0xb5,0x5a,0x2a,0xb5,0x1d,0x43,0xb4,0xd9,0x62,0x88,0xa4,0xcc,0xb7};
    static std::uint8_t c20[32] = {0x46,0xef,0xe2,0x63,0x81,0xfb,0x9b,0xd2,0xa2,0xe2,0x1e,0xc6,0x59,0x31,0x36,0xe2,0xb0,0xd6,0xef,0x6a,0xb4,0x55,0x6a,0x3a,0x87,0x69,0xb2,0xc5,0x11,0x49,0x99,0x6e};
    sm2_fp_from_bytes(a, a20);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c20, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a21[32] = {0xbb,0x80,0x65,0x22,0xb3,0x09,0xae,0x34,0x6d,0x29,0x11,0xc4,0x70,0x25,0x5a,0xb9,0x96,0xf0,0x66,0x48,0x0c,0x40,0x49,0x6f,0xc7,0xff,0xc2,0x15,0x14,0x5f,0x66,0xa2};
    static std::uint8_t c21[32] = {0x77,0x00,0xca,0x46,0x66,0x13,0x5c,0x68,0xda,0x52,0x23,0x88,0xe0,0x4a,0xb5,0x73,0x2d,0xe0,0xcc,0x91,0x18,0x80,0x92,0xde,0x8f,0xff,0x84,0x2a,0x28,0xbe,0xcd,0x45};
    sm2_fp_from_bytes(a, a21);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c21, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a22[32] = {0x7c,0xb4,0x7c,0xa9,0x84,0xa3,0x5d,0x16,0x9c,0x4e,0x3b,0xc5,0xa9,0xd9,0x28,0x08,0x82,0xb8,0x1d,0x0a,0x7b,0xdb,0x96,0x62,0xa7,0xa3,0xd5,0x84,0x7c,0xe5,0x3d,0xc0};
    static std::uint8_t c22[32] = {0xf9,0x68,0xf9,0x53,0x09,0x46,0xba,0x2d,0x38,0x9c,0x77,0x8b,0x53,0xb2,0x50,0x11,0x05,0x70,0x3a,0x14,0xf7,0xb7,0x2c,0xc5,0x4f,0x47,0xab,0x08,0xf9,0xca,0x7b,0x80};
    sm2_fp_from_bytes(a, a22);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c22, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a23[32] = {0x2b,0x6e,0x06,0x7c,0x31,0xae,0x35,0x46,0x26,0xf6,0x07,0x93,0x2a,0x08,0x9a,0x5e,0x90,0x5d,0xcf,0xcf,0xc7,0x91,0x2b,0xea,0x4c,0xa7,0xc4,0x1a,0xbd,0x6c,0x55,0x79};
    static std::uint8_t c23[32] = {0x56,0xdc,0x0c,0xf8,0x63,0x5c,0x6a,0x8c,0x4d,0xec,0x0f,0x26,0x54,0x11,0x34,0xbd,0x20,0xbb,0x9f,0x9f,0x8f,0x22,0x57,0xd4,0x99,0x4f,0x88,0x35,0x7a,0xd8,0xaa,0xf2};
    sm2_fp_from_bytes(a, a23);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c23, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a24[32] = {0xff,0x67,0x19,0xee,0x38,0x5e,0xd9,0xbf,0xb3,0x1a,0x74,0x2b,0xa4,0xa1,0x7a,0x59,0x26,0x13,0x3e,0xa9,0xdd,0x40,0xf9,0x6d,0x34,0x0a,0xc7,0x07,0xa3,0xf0,0xfe,0x24};
    static std::uint8_t c24[32] = {0xfe,0xce,0x33,0xdd,0x70,0xbd,0xb3,0x7f,0x66,0x34,0xe8,0x57,0x49,0x42,0xf4,0xb2,0x4c,0x26,0x7d,0x54,0xba,0x81,0xf2,0xd9,0x68,0x15,0x8e,0x0f,0x47,0xe1,0xfc,0x49};
    sm2_fp_from_bytes(a, a24);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c24, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a25[32] = {0x6b,0x96,0xef,0x3c,0x27,0xb6,0xbe,0x34,0x46,0x11,0xaa,0xd1,0xdd,0x78,0x87,0x28,0xdf,0x32,0xf4,0x51,0x7c,0x9b,0x85,0x04,0xc6,0xa7,0x35,0x60,0xa2,0xb9,0xa2,0x08};
    static std::uint8_t c25[32] = {0xd7,0x2d,0xde,0x78,0x4f,0x6d,0x7c,0x68,0x8c,0x23,0x55,0xa3,0xba,0xf1,0x0e,0x51,0xbe,0x65,0xe8,0xa2,0xf9,0x37,0x0a,0x09,0x8d,0x4e,0x6a,0xc1,0x45,0x73,0x44,0x10};
    sm2_fp_from_bytes(a, a25);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c25, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a26[32] = {0xd3,0xba,0xbd,0xfd,0x43,0xaf,0x92,0x2c,0x65,0xdc,0x5f,0x62,0xe6,0x86,0x56,0xfc,0x10,0x36,0x62,0x84,0x85,0x51,0x86,0x74,0x66,0xe8,0x7d,0x9e,0xb2,0x72,0xe1,0xc4};
    static std::uint8_t c26[32] = {0xa7,0x75,0x7b,0xfb,0x87,0x5f,0x24,0x58,0xcb,0xb8,0xbe,0xc5,0xcd,0x0c,0xad,0xf8,0x20,0x6c,0xc5,0x0a,0x0a,0xa3,0x0c,0xe7,0xcd,0xd0,0xfb,0x3d,0x64,0xe5,0xc3,0x89};
    sm2_fp_from_bytes(a, a26);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c26, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a27[32] = {0x4e,0x2d,0x28,0x38,0x2e,0x46,0x76,0x9f,0x1d,0xd7,0x75,0xf3,0xb1,0xc5,0xd1,0x07,0x55,0xbd,0x16,0x80,0x8a,0x0a,0xe5,0x28,0x27,0x8a,0x1b,0xf9,0x39,0xc7,0xf2,0xba};
    static std::uint8_t c27[32] = {0x9c,0x5a,0x50,0x70,0x5c,0x8c,0xed,0x3e,0x3b,0xae,0xeb,0xe7,0x63,0x8b,0xa2,0x0e,0xab,0x7a,0x2d,0x01,0x14,0x15,0xca,0x50,0x4f,0x14,0x37,0xf2,0x73,0x8f,0xe5,0x74};
    sm2_fp_from_bytes(a, a27);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c27, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a28[32] = {0x55,0xe6,0xb3,0xe1,0x50,0x29,0x0a,0x47,0x62,0xd4,0xd1,0xf9,0x73,0xda,0x35,0x47,0xd2,0x4b,0xa8,0x15,0x75,0x77,0x37,0xf8,0x3d,0x83,0x38,0xd4,0x8f,0x7e,0x8f,0xf5};
    static std::uint8_t c28[32] = {0xab,0xcd,0x67,0xc2,0xa0,0x52,0x14,0x8e,0xc5,0xa9,0xa3,0xf2,0xe7,0xb4,0x6a,0x8f,0xa4,0x97,0x50,0x2a,0xea,0xee,0x6f,0xf0,0x7b,0x06,0x71,0xa9,0x1e,0xfd,0x1f,0xea};
    sm2_fp_from_bytes(a, a28);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c28, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a29[32] = {0x54,0xea,0x16,0x72,0x46,0x92,0x25,0x90,0x16,0xfb,0x11,0xcf,0xab,0xbd,0x98,0x3d,0x4d,0x31,0x93,0xb4,0xcd,0x0d,0xcf,0xfb,0x19,0xdb,0xbf,0x97,0xaf,0x46,0x23,0xd6};
    static std::uint8_t c29[32] = {0xa9,0xd4,0x2c,0xe4,0x8d,0x24,0x4b,0x20,0x2d,0xf6,0x23,0x9f,0x57,0x7b,0x30,0x7a,0x9a,0x63,0x27,0x69,0x9a,0x1b,0x9f,0xf6,0x33,0xb7,0x7f,0x2f,0x5e,0x8c,0x47,0xac};
    sm2_fp_from_bytes(a, a29);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c29, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a30[32] = {0x45,0x1a,0xed,0xc1,0xe6,0x1f,0x3f,0x19,0x8a,0x92,0x91,0xb8,0xfd,0x6b,0x5e,0xdf,0xb5,0x45,0x7e,0xb9,0xc7,0xe0,0xe4,0xad,0x4c,0x9a,0xfa,0x94,0x29,0x5f,0x86,0x8c};
    static std::uint8_t c30[32] = {0x8a,0x35,0xdb,0x83,0xcc,0x3e,0x7e,0x33,0x15,0x25,0x23,0x71,0xfa,0xd6,0xbd,0xbf,0x6a,0x8a,0xfd,0x73,0x8f,0xc1,0xc9,0x5a,0x99,0x35,0xf5,0x28,0x52,0xbf,0x0d,0x18};
    sm2_fp_from_bytes(a, a30);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c30, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a31[32] = {0xbb,0x82,0xd1,0x4b,0xd3,0xbb,0x11,0xf9,0x51,0xc7,0x6e,0x7f,0xb3,0x2d,0xfd,0xbb,0x7a,0x1b,0x27,0xd5,0xf3,0x34,0x7e,0x7b,0xa5,0x57,0x64,0x68,0x12,0x8b,0x27,0x40};
    static std::uint8_t c31[32] = {0x77,0x05,0xa2,0x98,0xa7,0x76,0x23,0xf2,0xa3,0x8e,0xdc,0xff,0x66,0x5b,0xfb,0x76,0xf4,0x36,0x4f,0xac,0xe6,0x68,0xfc,0xf6,0x4a,0xae,0xc8,0xd0,0x25,0x16,0x4e,0x81};
    sm2_fp_from_bytes(a, a31);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c31, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a32[32] = {0x6e,0xaf,0xd2,0x04,0x66,0x8c,0xda,0xa2,0xc3,0x41,0xec,0xcf,0x29,0xda,0xae,0xe7,0x70,0xb5,0xc0,0x35,0x3f,0xbc,0xc3,0xb3,0xbf,0x15,0x71,0xae,0xb4,0x7d,0xbe,0x82};
    static std::uint8_t c32[32] = {0xdd,0x5f,0xa4,0x08,0xcd,0x19,0xb5,0x45,0x86,0x83,0xd9,0x9e,0x53,0xb5,0x5d,0xce,0xe1,0x6b,0x80,0x6a,0x7f,0x79,0x87,0x67,0x7e,0x2a,0xe3,0x5d,0x68,0xfb,0x7d,0x04};
    sm2_fp_from_bytes(a, a32);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c32, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a33[32] = {0x0b,0x33,0x37,0xec,0xce,0xcb,0x4d,0xb3,0x9c,0x47,0x4b,0xd1,0x44,0x53,0x2a,0x58,0xee,0x35,0x99,0x21,0x95,0xd6,0x84,0x46,0x3e,0x80,0xf8,0xe3,0x05,0xe8,0x10,0x44};
    static std::uint8_t c33[32] = {0x16,0x66,0x6f,0xd9,0x9d,0x96,0x9b,0x67,0x38,0x8e,0x97,0xa2,0x88,0xa6,0x54,0xb1,0xdc,0x6b,0x32,0x43,0x2b,0xad,0x08,0x8c,0x7d,0x01,0xf1,0xc6,0x0b,0xd0,0x20,0x88};
    sm2_fp_from_bytes(a, a33);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c33, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a34[32] = {0x79,0xc4,0xf6,0x24,0xa8,0xf6,0x54,0xdf,0x43,0xb7,0x14,0x7d,0x66,0xf4,0x2d,0x5f,0xa8,0xa9,0x8a,0x0b,0xaf,0x70,0xa5,0xa8,0xbc,0x80,0xcb,0xe8,0x9b,0xf3,0x04,0xc8};
    static std::uint8_t c34[32] = {0xf3,0x89,0xec,0x49,0x51,0xec,0xa9,0xbe,0x87,0x6e,0x28,0xfa,0xcd,0xe8,0x5a,0xbf,0x51,0x53,0x14,0x17,0x5e,0xe1,0x4b,0x51,0x79,0x01,0x97,0xd1,0x37,0xe6,0x09,0x90};
    sm2_fp_from_bytes(a, a34);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c34, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a35[32] = {0xef,0xac,0xf3,0x1f,0x20,0x10,0xc5,0xe8,0xf7,0xdb,0xb7,0x6a,0x9b,0x09,0xdc,0x03,0x63,0x95,0x44,0xd1,0x0c,0xa8,0xa9,0x97,0x54,0x7e,0x76,0x5c,0xb6,0xa3,0x66,0xef};
    static std::uint8_t c35[32] = {0xdf,0x59,0xe6,0x3f,0x40,0x21,0x8b,0xd1,0xef,0xb7,0x6e,0xd5,0x36,0x13,0xb8,0x06,0xc7,0x2a,0x89,0xa3,0x19,0x51,0x53,0x2d,0xa8,0xfc,0xec,0xb9,0x6d,0x46,0xcd,0xdf};
    sm2_fp_from_bytes(a, a35);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c35, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a36[32] = {0x9d,0xf8,0xc3,0x6e,0x4d,0x37,0x73,0x26,0x74,0x25,0xec,0x73,0x79,0x63,0x2f,0x74,0xa7,0x09,0x08,0x39,0xc2,0x73,0x93,0xdf,0x0e,0x0c,0x42,0x0f,0x4e,0xc8,0x61,0xd6};
    static std::uint8_t c36[32] = {0x3b,0xf1,0x86,0xdd,0x9a,0x6e,0xe6,0x4c,0xe8,0x4b,0xd8,0xe6,0xf2,0xc6,0x5e,0xe9,0x4e,0x12,0x10,0x74,0x84,0xe7,0x27,0xbd,0x1c,0x18,0x84,0x1e,0x9d,0x90,0xc3,0xad};
    sm2_fp_from_bytes(a, a36);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c36, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a37[32] = {0x8f,0x9f,0xde,0x52,0xcc,0xde,0xe8,0xf1,0x3e,0xe0,0x0a,0x22,0x2e,0xe7,0x9f,0xb4,0xd3,0x8b,0x22,0xbc,0x2f,0xac,0x71,0x43,0x38,0xe5,0xb7,0x34,0x87,0x33,0x08,0x88};
    static std::uint8_t c37[32] = {0x1f,0x3f,0xbc,0xa6,0x99,0xbd,0xd1,0xe2,0x7d,0xc0,0x14,0x44,0x5d,0xcf,0x3f,0x69,0xa7,0x16,0x45,0x79,0x5f,0x58,0xe2,0x85,0x71,0xcb,0x6e,0x69,0x0e,0x66,0x11,0x11};
    sm2_fp_from_bytes(a, a37);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c37, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a38[32] = {0xbf,0x69,0xe4,0x64,0x16,0x8a,0x10,0x52,0x4d,0x26,0xdc,0x94,0xc5,0xf5,0xec,0x3e,0x1f,0x73,0x01,0xe9,0x89,0xd7,0x4c,0xd4,0x87,0xd4,0x8d,0x31,0xf9,0x44,0x3d,0xfe};
    static std::uint8_t c38[32] = {0x7e,0xd3,0xc8,0xc9,0x2d,0x14,0x20,0xa4,0x9a,0x4d,0xb9,0x29,0x8b,0xeb,0xd8,0x7c,0x3e,0xe6,0x03,0xd4,0x13,0xae,0x99,0xa8,0x0f,0xa9,0x1a,0x63,0xf2,0x88,0x7b,0xfd};
    sm2_fp_from_bytes(a, a38);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c38, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a39[32] = {0xcc,0x14,0xa9,0xfa,0x1c,0xca,0x24,0x78,0xd8,0xd3,0x90,0x98,0xc8,0x86,0x08,0xe3,0x09,0x14,0xf3,0xf9,0x96,0x7a,0x64,0x3f,0xe8,0xf0,0x3b,0xd0,0xa3,0x3d,0xb2,0xd0};
    static std::uint8_t c39[32] = {0x98,0x29,0x53,0xf5,0x39,0x94,0x48,0xf1,0xb1,0xa7,0x21,0x31,0x91,0x0c,0x11,0xc6,0x12,0x29,0xe7,0xf4,0x2c,0xf4,0xc8,0x7e,0xd1,0xe0,0x77,0xa1,0x46,0x7b,0x65,0xa1};
    sm2_fp_from_bytes(a, a39);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c39, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a40[32] = {0x2d,0x9b,0x7e,0xd4,0xb1,0xba,0x5b,0x85,0x2b,0x9a,0x32,0x2b,0xfb,0x91,0x64,0xeb,0xa9,0xcf,0x18,0x0c,0xe8,0x8f,0xdf,0x80,0xd4,0x52,0xca,0x55,0x12,0xbd,0x0b,0xa4};
    static std::uint8_t c40[32] = {0x5b,0x36,0xfd,0xa9,0x63,0x74,0xb7,0x0a,0x57,0x34,0x64,0x57,0xf7,0x22,0xc9,0xd7,0x53,0x9e,0x30,0x19,0xd1,0x1f,0xbf,0x01,0xa8,0xa5,0x94,0xaa,0x25,0x7a,0x17,0x48};
    sm2_fp_from_bytes(a, a40);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c40, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a41[32] = {0x88,0x06,0x4d,0x15,0xee,0xbe,0x2f,0x21,0xdd,0xa8,0xc7,0xd7,0x56,0x24,0xc9,0xdf,0xfc,0x76,0xd7,0x03,0xda,0x93,0x44,0xb2,0xde,0x54,0x7a,0x35,0x13,0xbd,0x9c,0xc9};
    static std::uint8_t c41[32] = {0x10,0x0c,0x9a,0x2c,0xdd,0x7c,0x5e,0x43,0xbb,0x51,0x8f,0xae,0xac,0x49,0x93,0xbf,0xf8,0xed,0xae,0x08,0xb5,0x26,0x89,0x64,0xbc,0xa8,0xf4,0x6a,0x27,0x7b,0x39,0x93};
    sm2_fp_from_bytes(a, a41);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c41, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a42[32] = {0x81,0xb2,0x5b,0x85,0x2b,0xe2,0x13,0xc2,0xe5,0x87,0xcc,0x6b,0xcd,0xc1,0x1e,0xdc,0x55,0x2c,0xcb,0xe6,0xee,0x8a,0xef,0xf2,0x3b,0x40,0x5e,0x94,0x2e,0xaf,0xde,0xc3};
    static std::uint8_t c42[32] = {0x03,0x64,0xb7,0x0b,0x57,0xc4,0x27,0x85,0xcb,0x0f,0x98,0xd7,0x9b,0x82,0x3d,0xb8,0xaa,0x59,0x97,0xce,0xdd,0x15,0xdf,0xe3,0x76,0x80,0xbd,0x28,0x5d,0x5f,0xbd,0x87};
    sm2_fp_from_bytes(a, a42);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c42, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a43[32] = {0xee,0x68,0xeb,0x69,0x58,0x0a,0x80,0x1a,0x2b,0x0e,0x1d,0x2e,0x23,0x9c,0x9d,0xb6,0x5d,0x94,0x43,0x3f,0xb5,0x65,0xab,0xe2,0x47,0x8f,0x3a,0x21,0x37,0x1f,0xd2,0xfe};
    static std::uint8_t c43[32] = {0xdc,0xd1,0xd6,0xd3,0xb0,0x15,0x00,0x34,0x56,0x1c,0x3a,0x5c,0x47,0x39,0x3b,0x6c,0xbb,0x28,0x86,0x80,0x6a,0xcb,0x57,0xc3,0x8f,0x1e,0x74,0x42,0x6e,0x3f,0xa5,0xfd};
    sm2_fp_from_bytes(a, a43);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c43, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a44[32] = {0x36,0xc2,0x25,0xae,0xc5,0x1b,0x03,0x1d,0x05,0x29,0xb9,0xb1,0x9c,0x2d,0x68,0xad,0xd2,0x50,0x3d,0x5c,0xe2,0x28,0x8d,0x59,0x13,0xa0,0xbf,0x4d,0x57,0xb0,0xbf,0x4f};
    static std::uint8_t c44[32] = {0x6d,0x84,0x4b,0x5d,0x8a,0x36,0x06,0x3a,0x0a,0x53,0x73,0x63,0x38,0x5a,0xd1,0x5b,0xa4,0xa0,0x7a,0xb9,0xc4,0x51,0x1a,0xb2,0x27,0x41,0x7e,0x9a,0xaf,0x61,0x7e,0x9e};
    sm2_fp_from_bytes(a, a44);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c44, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a45[32] = {0x44,0x3f,0x1d,0x62,0xd5,0x1e,0x3a,0x32,0x3a,0x9d,0x07,0x39,0x5b,0x3a,0x06,0x83,0xc4,0x34,0xd9,0x47,0x26,0x0f,0xd2,0x9a,0xf2,0xe3,0xde,0x12,0x2b,0x44,0xd7,0xf1};
    static std::uint8_t c45[32] = {0x88,0x7e,0x3a,0xc5,0xaa,0x3c,0x74,0x64,0x75,0x3a,0x0e,0x72,0xb6,0x74,0x0d,0x07,0x88,0x69,0xb2,0x8e,0x4c,0x1f,0xa5,0x35,0xe5,0xc7,0xbc,0x24,0x56,0x89,0xaf,0xe2};
    sm2_fp_from_bytes(a, a45);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c45, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a46[32] = {0x20,0xb1,0xbf,0xd0,0x60,0xfa,0xad,0x83,0x86,0xc6,0x79,0x47,0x63,0x24,0x41,0x0d,0xb8,0xf6,0xc7,0x96,0xb9,0xc4,0xbb,0xb1,0x98,0x58,0x93,0xc8,0x1c,0x6a,0x6d,0xeb};
    static std::uint8_t c46[32] = {0x41,0x63,0x7f,0xa0,0xc1,0xf5,0x5b,0x07,0x0d,0x8c,0xf2,0x8e,0xc6,0x48,0x82,0x1b,0x71,0xed,0x8f,0x2d,0x73,0x89,0x77,0x63,0x30,0xb1,0x27,0x90,0x38,0xd4,0xdb,0xd6};
    sm2_fp_from_bytes(a, a46);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c46, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a47[32] = {0xc9,0x8b,0x28,0xd7,0xe2,0xcc,0x74,0x4c,0x7f,0x57,0x64,0x67,0x76,0xc2,0x9f,0xc1,0x0a,0x94,0xa6,0x28,0xba,0xdf,0x44,0xef,0x75,0x3a,0x2c,0x52,0xc1,0x4c,0x7b,0xf2};
    static std::uint8_t c47[32] = {0x93,0x16,0x51,0xb0,0xc5,0x98,0xe8,0x98,0xfe,0xae,0xc8,0xce,0xed,0x85,0x3f,0x82,0x15,0x29,0x4c,0x52,0x75,0xbe,0x89,0xdd,0xea,0x74,0x58,0xa5,0x82,0x98,0xf7,0xe5};
    sm2_fp_from_bytes(a, a47);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c47, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a48[32] = {0x8c,0xb0,0x6c,0x88,0x55,0x92,0xa5,0x78,0xd0,0x15,0xcd,0xa1,0x4e,0x85,0xbc,0x4f,0x97,0x26,0x00,0x02,0x2f,0xe1,0xcc,0xdb,0xce,0x53,0xce,0xa7,0x22,0xd6,0x3e,0x49};
    static std::uint8_t c48[32] = {0x19,0x60,0xd9,0x11,0xab,0x25,0x4a,0xf1,0xa0,0x2b,0x9b,0x42,0x9d,0x0b,0x78,0x9f,0x2e,0x4c,0x00,0x05,0x5f,0xc3,0x99,0xb6,0x9c,0xa7,0x9d,0x4e,0x45,0xac,0x7c,0x93};
    sm2_fp_from_bytes(a, a48);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c48, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a49[32] = {0xbc,0xba,0x91,0xcb,0xeb,0x31,0xfc,0x64,0x99,0xca,0x99,0x81,0xa6,0xfc,0xe3,0x82,0x30,0x58,0xe4,0xd6,0x66,0xd8,0x60,0x6a,0xca,0xd8,0xb2,0x51,0xa2,0x64,0xc8,0x19};
    static std::uint8_t c49[32] = {0x79,0x75,0x23,0x98,0xd6,0x63,0xf8,0xc9,0x33,0x95,0x33,0x03,0x4d,0xf9,0xc7,0x04,0x60,0xb1,0xc9,0xad,0xcd,0xb0,0xc0,0xd4,0x95,0xb1,0x64,0xa3,0x44,0xc9,0x90,0x33};
    sm2_fp_from_bytes(a, a49);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c49, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a50[32] = {0xba,0xc1,0xca,0x14,0xfd,0x01,0x85,0x50,0x4f,0x7f,0xc7,0xd5,0xf4,0x66,0xe4,0x2f,0xd5,0x7f,0x9b,0x91,0x78,0xd7,0x30,0xba,0x71,0xfd,0x87,0x31,0xf0,0x74,0x6c,0xa8};
    static std::uint8_t c50[32] = {0x75,0x83,0x94,0x2a,0xfa,0x03,0x0a,0xa0,0x9e,0xff,0x8f,0xab,0xe8,0xcd,0xc8,0x5f,0xaa,0xff,0x37,0x23,0xf1,0xae,0x61,0x73,0xe3,0xfb,0x0e,0x63,0xe0,0xe8,0xd9,0x51};
    sm2_fp_from_bytes(a, a50);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c50, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a51[32] = {0x6d,0x3d,0x4b,0xae,0xe9,0x3f,0x6d,0x79,0x92,0xb3,0x2f,0x73,0x4d,0x7a,0xe0,0x1e,0x04,0xe5,0xa5,0x99,0x36,0xca,0x00,0xa7,0x77,0xc9,0xe9,0xf8,0xc3,0x2a,0x94,0xa1};
    static std::uint8_t c51[32] = {0xda,0x7a,0x97,0x5d,0xd2,0x7e,0xda,0xf3,0x25,0x66,0x5e,0xe6,0x9a,0xf5,0xc0,0x3c,0x09,0xcb,0x4b,0x32,0x6d,0x94,0x01,0x4e,0xef,0x93,0xd3,0xf1,0x86,0x55,0x29,0x42};
    sm2_fp_from_bytes(a, a51);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c51, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a52[32] = {0x05,0x19,0x01,0x3a,0xa4,0x57,0x5b,0x59,0xc1,0x68,0xd9,0xe4,0xac,0x91,0x74,0x7d,0x43,0xec,0x27,0x95,0xfb,0xb6,0x18,0x72,0x6b,0xb6,0x73,0xcf,0x10,0x7d,0xea,0x8a};
    static std::uint8_t c52[32] = {0x0a,0x32,0x02,0x75,0x48,0xae,0xb6,0xb3,0x82,0xd1,0xb3,0xc9,0x59,0x22,0xe8,0xfa,0x87,0xd8,0x4f,0x2b,0xf7,0x6c,0x30,0xe4,0xd7,0x6c,0xe7,0x9e,0x20,0xfb,0xd5,0x14};
    sm2_fp_from_bytes(a, a52);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c52, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a53[32] = {0xe5,0x87,0x0b,0x3d,0xa8,0xaf,0xc4,0x3d,0x5f,0xa8,0x66,0x9d,0xe4,0x59,0x4f,0x3c,0x7c,0x72,0x1f,0xd7,0x45,0x7d,0xea,0x2d,0x8a,0x06,0x65,0x93,0x25,0x6d,0xd1,0x87};
    static std::uint8_t c53[32] = {0xcb,0x0e,0x16,0x7c,0x51,0x5f,0x88,0x7a,0xbf,0x50,0xcd,0x3b,0xc8,0xb2,0x9e,0x78,0xf8,0xe4,0x3f,0xaf,0x8a,0xfb,0xd4,0x5a,0x14,0x0c,0xcb,0x26,0x4a,0xdb,0xa3,0x0f};
    sm2_fp_from_bytes(a, a53);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c53, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a54[32] = {0xdf,0x20,0xc4,0x52,0x0e,0xb4,0xa4,0x47,0xc0,0xa8,0x9b,0xb3,0xa5,0x09,0xa4,0xde,0xa5,0xfc,0x9b,0xa6,0x14,0xe7,0x7c,0xd9,0x09,0xd5,0xa7,0xee,0x22,0x3e,0x6d,0x5f};
    static std::uint8_t c54[32] = {0xbe,0x41,0x88,0xa5,0x1d,0x69,0x48,0x8f,0x81,0x51,0x37,0x67,0x4a,0x13,0x49,0xbd,0x4b,0xf9,0x37,0x4d,0x29,0xce,0xf9,0xb1,0x13,0xab,0x4f,0xdc,0x44,0x7c,0xda,0xbf};
    sm2_fp_from_bytes(a, a54);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c54, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a55[32] = {0xd9,0xc6,0xb0,0xf0,0x29,0x0d,0xbc,0x68,0x39,0x10,0x3b,0xb7,0x9a,0xf6,0x7b,0x1d,0x6d,0xa3,0x0f,0x09,0x18,0x26,0xb2,0x1f,0x96,0x21,0xdd,0xe7,0x82,0xfa,0x1b,0x99};
    static std::uint8_t c55[32] = {0xb3,0x8d,0x61,0xe1,0x52,0x1b,0x78,0xd0,0x72,0x20,0x77,0x6f,0x35,0xec,0xf6,0x3a,0xdb,0x46,0x1e,0x13,0x30,0x4d,0x64,0x3e,0x2c,0x43,0xbb,0xcf,0x05,0xf4,0x37,0x33};
    sm2_fp_from_bytes(a, a55);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c55, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a56[32] = {0x9b,0xd3,0xdf,0xa3,0x75,0x31,0xa5,0xc8,0xad,0xfb,0x76,0x96,0x49,0x68,0x49,0x26,0x36,0x8b,0x95,0x93,0x72,0x00,0xf4,0xc9,0x67,0xbd,0xb7,0x37,0xbc,0xc6,0x21,0xc7};
    static std::uint8_t c56[32] = {0x37,0xa7,0xbf,0x47,0xea,0x63,0x4b,0x91,0x5b,0xf6,0xed,0x2c,0x92,0xd0,0x92,0x4c,0x6d,0x17,0x2b,0x27,0xe4,0x01,0xe9,0x91,0xcf,0x7b,0x6e,0x6f,0x79,0x8c,0x43,0x8f};
    sm2_fp_from_bytes(a, a56);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c56, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a57[32] = {0x4f,0xea,0x1e,0x21,0xd9,0x3f,0xc4,0xe2,0x46,0x94,0x0f,0x84,0x79,0x5f,0xef,0xff,0x6e,0x44,0x14,0x9e,0x19,0xa8,0x5b,0xae,0xf4,0xb8,0xf2,0x21,0x4b,0x53,0xa5,0x42};
    static std::uint8_t c57[32] = {0x9f,0xd4,0x3c,0x43,0xb2,0x7f,0x89,0xc4,0x8d,0x28,0x1f,0x08,0xf2,0xbf,0xdf,0xfe,0xdc,0x88,0x29,0x3c,0x33,0x50,0xb7,0x5d,0xe9,0x71,0xe4,0x42,0x96,0xa7,0x4a,0x84};
    sm2_fp_from_bytes(a, a57);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c57, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a58[32] = {0x93,0x98,0xe6,0xf0,0x12,0x9d,0xfe,0xe4,0x98,0xaf,0xc2,0x61,0xc6,0x9a,0x7c,0x39,0x77,0x6f,0x71,0x16,0x4e,0x37,0xc7,0x64,0xbc,0x35,0x5a,0x33,0x73,0x34,0x39,0xc0};
    static std::uint8_t c58[32] = {0x27,0x31,0xcd,0xe1,0x25,0x3b,0xfd,0xc9,0x31,0x5f,0x84,0xc3,0x8d,0x34,0xf8,0x72,0xee,0xde,0xe2,0x2d,0x9c,0x6f,0x8e,0xc8,0x78,0x6a,0xb4,0x66,0xe6,0x68,0x73,0x81};
    sm2_fp_from_bytes(a, a58);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c58, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a59[32] = {0xe9,0x13,0xd8,0x5b,0x04,0xa8,0xcd,0x90,0x3f,0x27,0xac,0x18,0x58,0x7d,0x4f,0x04,0x34,0xb6,0xae,0x9d,0x0a,0x8a,0xd6,0xd7,0xc6,0x90,0x12,0xff,0x7a,0x61,0xcb,0x56};
    static std::uint8_t c59[32] = {0xd2,0x27,0xb0,0xb7,0x09,0x51,0x9b,0x20,0x7e,0x4f,0x58,0x30,0xb0,0xfa,0x9e,0x08,0x69,0x6d,0x5d,0x3b,0x15,0x15,0xad,0xae,0x8d,0x20,0x25,0xfe,0xf4,0xc3,0x96,0xad};
    sm2_fp_from_bytes(a, a59);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c59, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a60[32] = {0x2c,0xd0,0x49,0x3f,0xea,0x24,0x45,0x3d,0xd6,0x13,0x3d,0x1f,0x54,0xb8,0x27,0x42,0x22,0xf2,0x4e,0x74,0x4c,0x6f,0xb4,0xc8,0x8c,0x4f,0x9d,0x6d,0x4e,0x9f,0x57,0x8d};
    static std::uint8_t c60[32] = {0x59,0xa0,0x92,0x7f,0xd4,0x48,0x8a,0x7b,0xac,0x26,0x7a,0x3e,0xa9,0x70,0x4e,0x84,0x45,0xe4,0x9c,0xe8,0x98,0xdf,0x69,0x91,0x18,0x9f,0x3a,0xda,0x9d,0x3e,0xaf,0x1a};
    sm2_fp_from_bytes(a, a60);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c60, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a61[32] = {0x47,0xae,0x83,0x5a,0xb2,0x50,0xcd,0xed,0x56,0x9d,0xd2,0xe0,0x53,0x68,0x13,0xbf,0x9b,0x05,0xf7,0x9d,0xb8,0x6f,0x4a,0xc4,0x5a,0x4a,0x89,0x71,0xc2,0xf5,0x2c,0x1b};
    static std::uint8_t c61[32] = {0x8f,0x5d,0x06,0xb5,0x64,0xa1,0x9b,0xda,0xad,0x3b,0xa5,0xc0,0xa6,0xd0,0x27,0x7f,0x36,0x0b,0xef,0x3b,0x70,0xde,0x95,0x88,0xb4,0x95,0x12,0xe3,0x85,0xea,0x58,0x36};
    sm2_fp_from_bytes(a, a61);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c61, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a62[32] = {0xdb,0x58,0x17,0xbd,0xd1,0xa9,0x8d,0xa3,0xe8,0x4f,0x5b,0xf0,0x05,0xf6,0x46,0x80,0xc2,0x3c,0xee,0xff,0xe2,0xa9,0x1e,0xba,0x79,0x45,0x86,0xe8,0x90,0x07,0x8a,0x3b};
    static std::uint8_t c62[32] = {0xb6,0xb0,0x2f,0x7c,0xa3,0x53,0x1b,0x47,0xd0,0x9e,0xb7,0xe0,0x0b,0xec,0x8d,0x01,0x84,0x79,0xde,0x00,0xc5,0x52,0x3d,0x73,0xf2,0x8b,0x0d,0xd1,0x20,0x0f,0x14,0x77};
    sm2_fp_from_bytes(a, a62);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c62, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a63[32] = {0xad,0x63,0x0b,0x30,0xf9,0x81,0x6d,0x46,0x87,0x99,0xa4,0xf6,0x81,0x26,0x39,0xf9,0x57,0xbb,0xe5,0xb5,0x33,0x7f,0x20,0xd8,0xbe,0xaf,0x98,0x15,0xee,0x48,0xf1,0xd4};
    static std::uint8_t c63[32] = {0x5a,0xc6,0x16,0x62,0xf3,0x02,0xda,0x8d,0x0f,0x33,0x49,0xed,0x02,0x4c,0x73,0xf2,0xaf,0x77,0xcb,0x6b,0x66,0xfe,0x41,0xb0,0x7d,0x5f,0x30,0x2b,0xdc,0x91,0xe3,0xa9};
    sm2_fp_from_bytes(a, a63);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c63, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a64[32] = {0x7f,0x0f,0x9f,0x1f,0xe7,0x8e,0x6a,0x0e,0xad,0xed,0x90,0x7d,0x6b,0x8c,0x02,0x55,0x03,0xb6,0x50,0x17,0xd7,0x07,0x23,0x0f,0x78,0x11,0x08,0x2c,0x15,0x6c,0xb1,0x00};
    static std::uint8_t c64[32] = {0xfe,0x1f,0x3e,0x3f,0xcf,0x1c,0xd4,0x1d,0x5b,0xdb,0x20,0xfa,0xd7,0x18,0x04,0xaa,0x07,0x6c,0xa0,0x2f,0xae,0x0e,0x46,0x1e,0xf0,0x22,0x10,0x58,0x2a,0xd9,0x62,0x00};
    sm2_fp_from_bytes(a, a64);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c64, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a65[32] = {0xf4,0x3a,0x0c,0xa4,0xec,0xbe,0xe5,0x89,0xef,0x2d,0xf0,0x57,0x45,0x89,0xcd,0x9c,0x56,0x25,0x62,0x7f,0x8d,0x0d,0x48,0x41,0xc1,0x37,0xab,0x57,0x2d,0x1c,0x8f,0x25};
    static std::uint8_t c65[32] = {0xe8,0x74,0x19,0x4a,0xd9,0x7d,0xcb,0x13,0xde,0x5b,0xe0,0xae,0x8b,0x13,0x9b,0x38,0xac,0x4a,0xc5,0x00,0x1a,0x1a,0x90,0x82,0x82,0x6f,0x56,0xae,0x5a,0x39,0x1e,0x4b};
    sm2_fp_from_bytes(a, a65);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c65, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a66[32] = {0x79,0xcc,0xc7,0x4c,0x3e,0xf7,0x76,0x25,0xd0,0x34,0x3b,0x11,0x59,0x0b,0xd9,0x03,0x04,0x45,0x29,0x9a,0xe5,0x0d,0x57,0x5a,0x70,0x97,0x6e,0xdb,0x70,0x4c,0xe1,0x02};
    static std::uint8_t c66[32] = {0xf3,0x99,0x8e,0x98,0x7d,0xee,0xec,0x4b,0xa0,0x68,0x76,0x22,0xb2,0x17,0xb2,0x06,0x08,0x8a,0x53,0x35,0xca,0x1a,0xae,0xb4,0xe1,0x2e,0xdd,0xb6,0xe0,0x99,0xc2,0x04};
    sm2_fp_from_bytes(a, a66);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c66, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a67[32] = {0x01,0x61,0x1c,0xfa,0x0e,0xe1,0x95,0xde,0x22,0xdf,0xe3,0x86,0x00,0xf2,0x14,0x44,0x8e,0x59,0x66,0x89,0x8e,0xbc,0xe8,0xb4,0x59,0x67,0x75,0x01,0xd9,0x17,0xed,0x92};
    static std::uint8_t c67[32] = {0x02,0xc2,0x39,0xf4,0x1d,0xc3,0x2b,0xbc,0x45,0xbf,0xc7,0x0c,0x01,0xe4,0x28,0x89,0x1c,0xb2,0xcd,0x13,0x1d,0x79,0xd1,0x68,0xb2,0xce,0xea,0x03,0xb2,0x2f,0xdb,0x24};
    sm2_fp_from_bytes(a, a67);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c67, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a68[32] = {0x5e,0xad,0x84,0xba,0xf3,0xf0,0x4c,0x55,0x77,0x65,0xee,0x61,0x39,0x5f,0x42,0xea,0x15,0xa5,0x00,0xe7,0x9c,0xf7,0xc9,0xa7,0x68,0xbb,0x0b,0xca,0x85,0xe8,0x64,0x6a};
    static std::uint8_t c68[32] = {0xbd,0x5b,0x09,0x75,0xe7,0xe0,0x98,0xaa,0xee,0xcb,0xdc,0xc2,0x72,0xbe,0x85,0xd4,0x2b,0x4a,0x01,0xcf,0x39,0xef,0x93,0x4e,0xd1,0x76,0x17,0x95,0x0b,0xd0,0xc8,0xd4};
    sm2_fp_from_bytes(a, a68);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c68, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a69[32] = {0xb2,0x3e,0x1d,0xa2,0xa0,0x4d,0xde,0xfd,0xa2,0x3d,0xc1,0xd7,0xe6,0x48,0x6e,0xd9,0x72,0x65,0x70,0x2e,0xcc,0x4b,0x88,0xae,0xfa,0xdb,0xd7,0x2e,0xfc,0xf2,0x89,0xe9};
    static std::uint8_t c69[32] = {0x64,0x7c,0x3b,0x46,0x40,0x9b,0xbd,0xfb,0x44,0x7b,0x83,0xaf,0xcc,0x90,0xdd,0xb2,0xe4,0xca,0xe0,0x5e,0x98,0x97,0x11,0x5c,0xf5,0xb7,0xae,0x5d,0xf9,0xe5,0x13,0xd3};
    sm2_fp_from_bytes(a, a69);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c69, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a70[32] = {0x4e,0xaf,0x98,0x6e,0x18,0xf7,0xe8,0x6c,0xc5,0x86,0xe9,0xea,0x5f,0xa2,0x51,0xdf,0x55,0xe0,0x1f,0xfc,0xe2,0xe8,0xb8,0x40,0x75,0xb6,0x60,0x57,0xe8,0xd9,0x33,0xc9};
    static std::uint8_t c70[32] = {0x9d,0x5f,0x30,0xdc,0x31,0xef,0xd0,0xd9,0x8b,0x0d,0xd3,0xd4,0xbf,0x44,0xa3,0xbe,0xab,0xc0,0x3f,0xf9,0xc5,0xd1,0x70,0x80,0xeb,0x6c,0xc0,0xaf,0xd1,0xb2,0x67,0x92};
    sm2_fp_from_bytes(a, a70);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c70, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a71[32] = {0x65,0xac,0xbb,0xcd,0x99,0xf5,0x63,0x6d,0x30,0x97,0xeb,0x43,0x9f,0xc8,0xa3,0xa4,0xbd,0x03,0xfe,0xd8,0xcc,0x71,0xb8,0xb2,0xa1,0x78,0x82,0x46,0x8e,0x12,0x70,0x19};
    static std::uint8_t c71[32] = {0xcb,0x59,0x77,0x9b,0x33,0xea,0xc6,0xda,0x61,0x2f,0xd6,0x87,0x3f,0x91,0x47,0x49,0x7a,0x07,0xfd,0xb1,0x98,0xe3,0x71,0x65,0x42,0xf1,0x04,0x8d,0x1c,0x24,0xe0,0x32};
    sm2_fp_from_bytes(a, a71);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c71, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a72[32] = {0x82,0xa4,0x1c,0x4c,0x68,0xa1,0x85,0x9a,0xe0,0x58,0xe2,0xb0,0x10,0xf7,0xce,0x2d,0xa4,0xe7,0x1a,0xff,0xec,0x11,0x6b,0x9f,0xb6,0x06,0x38,0x54,0x44,0x6e,0xfe,0x9c};
    static std::uint8_t c72[32] = {0x05,0x48,0x38,0x99,0xd1,0x43,0x0b,0x35,0xc0,0xb1,0xc5,0x60,0x21,0xef,0x9c,0x5b,0x49,0xce,0x36,0x00,0xd8,0x22,0xd7,0x3e,0x6c,0x0c,0x70,0xa8,0x88,0xdd,0xfd,0x39};
    sm2_fp_from_bytes(a, a72);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c72, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a73[32] = {0x20,0x77,0xb5,0x4a,0xfe,0x83,0xe5,0xfa,0x27,0x45,0x95,0x24,0x72,0xf4,0x6e,0xaf,0x84,0x58,0x95,0xb8,0x38,0xc5,0x82,0x38,0xd8,0x06,0x97,0x14,0xaa,0x85,0x4d,0x7b};
    static std::uint8_t c73[32] = {0x40,0xef,0x6a,0x95,0xfd,0x07,0xcb,0xf4,0x4e,0x8b,0x2a,0x48,0xe5,0xe8,0xdd,0x5f,0x08,0xb1,0x2b,0x70,0x71,0x8b,0x04,0x71,0xb0,0x0d,0x2e,0x29,0x55,0x0a,0x9a,0xf6};
    sm2_fp_from_bytes(a, a73);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c73, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a74[32] = {0x48,0xd7,0x4e,0x84,0xde,0x7b,0xf5,0xa7,0x70,0xb9,0x43,0xe6,0xd3,0xc4,0xe6,0x83,0x31,0xd1,0x31,0xa3,0xb9,0x31,0x91,0xb5,0x21,0xe7,0x6c,0xe2,0xc1,0xc9,0xa0,0xe9};
    static std::uint8_t c74[32] = {0x91,0xae,0x9d,0x09,0xbc,0xf7,0xeb,0x4e,0xe1,0x72,0x87,0xcd,0xa7,0x89,0xcd,0x06,0x63,0xa2,0x63,0x47,0x72,0x63,0x23,0x6a,0x43,0xce,0xd9,0xc5,0x83,0x93,0x41,0xd2};
    sm2_fp_from_bytes(a, a74);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c74, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a75[32] = {0x64,0xc7,0x14,0x2a,0x92,0xcf,0x87,0x92,0x08,0xae,0xa6,0xe8,0x1d,0xee,0xaf,0x97,0x5a,0xbc,0xea,0xf6,0x71,0x21,0xd0,0x89,0xa2,0x85,0xdf,0xac,0xdd,0x9b,0xb3,0xab};
    static std::uint8_t c75[32] = {0xc9,0x8e,0x28,0x55,0x25,0x9f,0x0f,0x24,0x11,0x5d,0x4d,0xd0,0x3b,0xdd,0x5f,0x2e,0xb5,0x79,0xd5,0xec,0xe2,0x43,0xa1,0x13,0x45,0x0b,0xbf,0x59,0xbb,0x37,0x67,0x56};
    sm2_fp_from_bytes(a, a75);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c75, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a76[32] = {0xea,0x89,0xab,0x8e,0x7e,0x41,0x7f,0x36,0xd2,0xdd,0x1a,0x54,0xc3,0xb6,0xba,0x4f,0x14,0xad,0x4a,0x92,0x5a,0x6e,0xd8,0xe8,0xf7,0x7c,0x67,0xa1,0xd0,0x99,0x77,0x31};
    static std::uint8_t c76[32] = {0xd5,0x13,0x57,0x1d,0xfc,0x82,0xfe,0x6d,0xa5,0xba,0x34,0xa9,0x87,0x6d,0x74,0x9e,0x29,0x5a,0x95,0x25,0xb4,0xdd,0xb1,0xd0,0xee,0xf8,0xcf,0x43,0xa1,0x32,0xee,0x63};
    sm2_fp_from_bytes(a, a76);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c76, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a77[32] = {0x4e,0xf3,0x39,0x71,0xe7,0xee,0x24,0x0c,0xa1,0x48,0x3a,0x93,0x4f,0x02,0x59,0x1b,0xa1,0xd5,0xeb,0x5d,0x00,0x74,0x2c,0x97,0xcb,0x67,0x7f,0xf6,0xd3,0xcd,0xa1,0x7d};
    static std::uint8_t c77[32] = {0x9d,0xe6,0x72,0xe3,0xcf,0xdc,0x48,0x19,0x42,0x90,0x75,0x26,0x9e,0x04,0xb2,0x37,0x43,0xab,0xd6,0xba,0x00,0xe8,0x59,0x2f,0x96,0xce,0xff,0xed,0xa7,0x9b,0x42,0xfa};
    sm2_fp_from_bytes(a, a77);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c77, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a78[32] = {0x26,0x86,0x3b,0x41,0xd0,0xe4,0x87,0xe7,0x16,0xdc,0xa8,0x4a,0x62,0xc4,0xc2,0xa8,0x3b,0xf0,0x76,0xf5,0x9d,0x03,0xef,0x19,0xe4,0xdf,0x3b,0x68,0xc8,0xe4,0x18,0xef};
    static std::uint8_t c78[32] = {0x4d,0x0c,0x76,0x83,0xa1,0xc9,0x0f,0xce,0x2d,0xb9,0x50,0x94,0xc5,0x89,0x85,0x50,0x77,0xe0,0xed,0xeb,0x3a,0x07,0xde,0x33,0xc9,0xbe,0x76,0xd1,0x91,0xc8,0x31,0xde};
    sm2_fp_from_bytes(a, a78);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c78, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a79[32] = {0x45,0x2f,0xa8,0xd5,0xd7,0x39,0x91,0x71,0x52,0xb2,0x4a,0x23,0x0d,0x72,0x81,0x80,0x8f,0x2c,0x69,0x92,0xb0,0x6b,0x85,0x1a,0xc4,0x31,0xc5,0xb8,0x9a,0xb2,0x67,0xe1};
    static std::uint8_t c79[32] = {0x8a,0x5f,0x51,0xab,0xae,0x73,0x22,0xe2,0xa5,0x64,0x94,0x46,0x1a,0xe5,0x03,0x01,0x1e,0x58,0xd3,0x25,0x60,0xd7,0x0a,0x35,0x88,0x63,0x8b,0x71,0x35,0x64,0xcf,0xc2};
    sm2_fp_from_bytes(a, a79);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c79, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a80[32] = {0x3c,0x81,0x27,0x3f,0xf6,0x6f,0xd9,0x5d,0xe0,0xd6,0xb0,0xa5,0x2a,0x9c,0x19,0x77,0x69,0xab,0xe6,0xd7,0xe7,0xf2,0x43,0x13,0x81,0x95,0xbe,0x72,0x50,0x4c,0xdd,0xa2};
    static std::uint8_t c80[32] = {0x79,0x02,0x4e,0x7f,0xec,0xdf,0xb2,0xbb,0xc1,0xad,0x61,0x4a,0x55,0x38,0x32,0xee,0xd3,0x57,0xcd,0xaf,0xcf,0xe4,0x86,0x27,0x03,0x2b,0x7c,0xe4,0xa0,0x99,0xbb,0x44};
    sm2_fp_from_bytes(a, a80);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c80, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a81[32] = {0x94,0xac,0xa3,0x8d,0x34,0xad,0xef,0x74,0x60,0x61,0x6c,0x19,0x29,0x63,0x58,0x49,0xcf,0x24,0xb9,0xb4,0x30,0xca,0x59,0xf8,0x50,0x2f,0xdf,0xda,0xed,0xe4,0xa3,0x14};
    static std::uint8_t c81[32] = {0x29,0x59,0x47,0x1b,0x69,0x5b,0xde,0xe8,0xc0,0xc2,0xd8,0x32,0x52,0xc6,0xb0,0x93,0x9e,0x49,0x73,0x69,0x61,0x94,0xb3,0xef,0xa0,0x5f,0xbf,0xb5,0xdb,0xc9,0x46,0x29};
    sm2_fp_from_bytes(a, a81);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c81, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a82[32] = {0xaa,0xa8,0xa0,0x97,0xdb,0xcf,0x9b,0x65,0xe7,0x76,0x0d,0xf4,0xc2,0x89,0xaa,0x8c,0x24,0x8b,0x91,0x79,0x06,0xf0,0x8b,0x9f,0x33,0xd4,0x81,0xbd,0xe8,0xca,0xbb,0xe2};
    static std::uint8_t c82[32] = {0x55,0x51,0x41,0x30,0xb7,0x9f,0x36,0xcb,0xce,0xec,0x1b,0xe9,0x85,0x13,0x55,0x18,0x49,0x17,0x22,0xf3,0x0d,0xe1,0x17,0x3d,0x67,0xa9,0x03,0x7b,0xd1,0x95,0x77,0xc5};
    sm2_fp_from_bytes(a, a82);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c82, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a83[32] = {0x18,0xa6,0x00,0x00,0x85,0x53,0x49,0x2d,0x30,0xf4,0x6c,0x49,0xa8,0xd8,0x28,0x54,0x83,0xc9,0x53,0x3f,0xbb,0x8a,0x5b,0xef,0x71,0x20,0xc4,0x8b,0x80,0xb1,0x70,0xc5};
    static std::uint8_t c83[32] = {0x31,0x4c,0x00,0x01,0x0a,0xa6,0x92,0x5a,0x61,0xe8,0xd8,0x93,0x51,0xb0,0x50,0xa9,0x07,0x92,0xa6,0x7f,0x77,0x14,0xb7,0xde,0xe2,0x41,0x89,0x17,0x01,0x62,0xe1,0x8a};
    sm2_fp_from_bytes(a, a83);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c83, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a84[32] = {0x31,0xc4,0x60,0x9a,0x64,0x0e,0x90,0x24,0x41,0xc4,0x5c,0xd0,0x07,0x7d,0xda,0x99,0x2c,0x74,0x1e,0x11,0x22,0x6c,0xb5,0x3c,0x73,0x4e,0xf1,0x69,0xca,0x20,0x2f,0x58};
    static std::uint8_t c84[32] = {0x63,0x88,0xc1,0x34,0xc8,0x1d,0x20,0x48,0x83,0x88,0xb9,0xa0,0x0e,0xfb,0xb5,0x32,0x58,0xe8,0x3c,0x22,0x44,0xd9,0x6a,0x78,0xe6,0x9d,0xe2,0xd3,0x94,0x40,0x5e,0xb0};
    sm2_fp_from_bytes(a, a84);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c84, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a85[32] = {0x29,0x6b,0xad,0x47,0x4c,0x09,0x5f,0x47,0xe0,0xd8,0xd6,0xb4,0xaf,0x1b,0x3b,0xde,0x8a,0x81,0x72,0x60,0x56,0x8a,0x69,0x4e,0x0c,0x26,0x30,0x6c,0xfd,0xf0,0x31,0x9d};
    static std::uint8_t c85[32] = {0x52,0xd7,0x5a,0x8e,0x98,0x12,0xbe,0x8f,0xc1,0xb1,0xad,0x69,0x5e,0x36,0x77,0xbd,0x15,0x02,0xe4,0xc0,0xad,0x14,0xd2,0x9c,0x18,0x4c,0x60,0xd9,0xfb,0xe0,0x63,0x3a};
    sm2_fp_from_bytes(a, a85);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c85, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a86[32] = {0x01,0x0d,0x3d,0xe1,0x26,0xa5,0xac,0x65,0xf3,0x83,0x0d,0x49,0xae,0xe7,0x12,0xe5,0x22,0xcf,0xc3,0x2d,0xf6,0xef,0xda,0x44,0x7d,0x2d,0xba,0x0c,0xc4,0x14,0xf0,0x08};
    static std::uint8_t c86[32] = {0x02,0x1a,0x7b,0xc2,0x4d,0x4b,0x58,0xcb,0xe7,0x06,0x1a,0x93,0x5d,0xce,0x25,0xca,0x45,0x9f,0x86,0x5b,0xed,0xdf,0xb4,0x88,0xfa,0x5b,0x74,0x19,0x88,0x29,0xe0,0x10};
    sm2_fp_from_bytes(a, a86);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c86, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a87[32] = {0x8f,0xae,0x32,0xb1,0x82,0x46,0xb3,0x7c,0x48,0xea,0xf6,0xaa,0x88,0x2c,0xd0,0xac,0x3e,0x52,0xfd,0xfb,0x6c,0xea,0xff,0x3e,0x7c,0x0a,0x94,0xe4,0xa5,0x6c,0x4b,0x8b};
    static std::uint8_t c87[32] = {0x1f,0x5c,0x65,0x64,0x04,0x8d,0x66,0xf8,0x91,0xd5,0xed,0x55,0x10,0x59,0xa1,0x58,0x7c,0xa5,0xfb,0xf7,0xd9,0xd5,0xfe,0x7b,0xf8,0x15,0x29,0xc9,0x4a,0xd8,0x97,0x17};
    sm2_fp_from_bytes(a, a87);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c87, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a88[32] = {0x7a,0xe6,0x1a,0x9f,0xda,0x69,0xa8,0x8a,0xf5,0xe7,0x5d,0x2f,0x8d,0xb9,0x27,0x06,0x49,0x4e,0xd3,0xbf,0xdd,0x3b,0x34,0xab,0x2a,0x37,0xd6,0xd3,0x42,0x8f,0x9d,0x7d};
    static std::uint8_t c88[32] = {0xf5,0xcc,0x35,0x3f,0xb4,0xd3,0x51,0x15,0xeb,0xce,0xba,0x5f,0x1b,0x72,0x4e,0x0c,0x92,0x9d,0xa7,0x7f,0xba,0x76,0x69,0x56,0x54,0x6f,0xad,0xa6,0x85,0x1f,0x3a,0xfa};
    sm2_fp_from_bytes(a, a88);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c88, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a89[32] = {0xf8,0x90,0x13,0x29,0x57,0xce,0x7e,0x33,0xb6,0x26,0xdd,0x0f,0xf5,0xf4,0x87,0x70,0x0a,0xfa,0xd3,0xb6,0x82,0x55,0x45,0x48,0xc3,0x87,0xb0,0xc7,0x23,0x07,0xa7,0x46};
    static std::uint8_t c89[32] = {0xf1,0x20,0x26,0x53,0xaf,0x9c,0xfc,0x67,0x6c,0x4d,0xba,0x1f,0xeb,0xe9,0x0e,0xe0,0x15,0xf5,0xa7,0x6e,0x04,0xaa,0x8a,0x90,0x87,0x0f,0x61,0x8e,0x46,0x0f,0x4e,0x8d};
    sm2_fp_from_bytes(a, a89);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c89, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a90[32] = {0xd2,0xf6,0x80,0xea,0x2e,0x2a,0x35,0x07,0x1a,0x66,0x0b,0xc0,0xa7,0x14,0x98,0x60,0x6b,0x27,0x57,0xaf,0xee,0xed,0x99,0xf1,0x79,0x9e,0x40,0xa0,0x89,0x92,0xd3,0xfb};
    static std::uint8_t c90[32] = {0xa5,0xed,0x01,0xd5,0x5c,0x54,0x6a,0x0e,0x34,0xcc,0x17,0x81,0x4e,0x29,0x30,0xc0,0xd6,0x4e,0xaf,0x60,0xdd,0xdb,0x33,0xe1,0xf3,0x3c,0x81,0x41,0x13,0x25,0xa7,0xf7};
    sm2_fp_from_bytes(a, a90);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c90, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a91[32] = {0x72,0xde,0x8e,0x2e,0xa3,0x3c,0x71,0xff,0xa6,0x04,0xf4,0xa6,0x93,0x55,0x9b,0x5a,0x75,0xaf,0x40,0x87,0x8a,0x93,0x91,0xe3,0xbd,0xdb,0x08,0x3f,0x11,0x25,0x7d,0x8a};
    static std::uint8_t c91[32] = {0xe5,0xbd,0x1c,0x5d,0x46,0x78,0xe3,0xff,0x4c,0x09,0xe9,0x4d,0x26,0xab,0x36,0xb4,0xeb,0x5e,0x81,0x0f,0x15,0x27,0x23,0xc7,0x7b,0xb6,0x10,0x7e,0x22,0x4a,0xfb,0x14};
    sm2_fp_from_bytes(a, a91);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c91, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a92[32] = {0xb1,0x6b,0x78,0xf2,0x30,0x86,0x04,0xf8,0x4d,0x3d,0xe4,0xf4,0x07,0xcb,0x4c,0xdf,0x2c,0x8b,0xfb,0x08,0x74,0x23,0xf3,0xd7,0x06,0x4d,0x9e,0x06,0x86,0x44,0xcf,0x48};
    static std::uint8_t c92[32] = {0x62,0xd6,0xf1,0xe5,0x61,0x0c,0x09,0xf0,0x9a,0x7b,0xc9,0xe8,0x0f,0x96,0x99,0xbe,0x59,0x17,0xf6,0x11,0xe8,0x47,0xe7,0xad,0x0c,0x9b,0x3c,0x0d,0x0c,0x89,0x9e,0x91};
    sm2_fp_from_bytes(a, a92);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c92, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a93[32] = {0x32,0x16,0x87,0xa8,0xa6,0x37,0x4a,0xe3,0x37,0x58,0x11,0x33,0x0a,0xd0,0x3c,0x3f,0xe7,0x5d,0x44,0xac,0x78,0x47,0x38,0x12,0xc7,0xf5,0xb4,0x73,0x8b,0x16,0x14,0x0f};
    static std::uint8_t c93[32] = {0x64,0x2d,0x0f,0x51,0x4c,0x6e,0x95,0xc6,0x6e,0xb0,0x22,0x66,0x15,0xa0,0x78,0x7f,0xce,0xba,0x89,0x58,0xf0,0x8e,0x70,0x25,0x8f,0xeb,0x68,0xe7,0x16,0x2c,0x28,0x1e};
    sm2_fp_from_bytes(a, a93);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c93, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a94[32] = {0xf9,0x6f,0x20,0x5d,0x60,0x13,0xd1,0x7f,0xd4,0xbf,0x76,0x51,0x8a,0xbb,0xa8,0x88,0x94,0x3a,0x13,0x9d,0x3b,0xc0,0xda,0x12,0x6e,0x1e,0x15,0x3d,0x65,0xb9,0x7c,0x75};
    static std::uint8_t c94[32] = {0xf2,0xde,0x40,0xbb,0xc0,0x27,0xa2,0xff,0xa9,0x7e,0xec,0xa3,0x15,0x77,0x51,0x11,0x28,0x74,0x27,0x3b,0x77,0x81,0xb4,0x23,0xdc,0x3c,0x2a,0x7a,0xcb,0x72,0xf8,0xeb};
    sm2_fp_from_bytes(a, a94);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c94, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a95[32] = {0x8b,0x3f,0xc9,0x17,0x96,0x42,0xb0,0x22,0x1c,0xe4,0x51,0x03,0xca,0xa4,0xd4,0x84,0x2c,0x6f,0x5a,0x16,0xf8,0xc9,0x26,0x89,0x8c,0xd1,0x92,0x95,0x78,0xca,0xa2,0x27};
    static std::uint8_t c95[32] = {0x16,0x7f,0x92,0x30,0x2c,0x85,0x60,0x44,0x39,0xc8,0xa2,0x07,0x95,0x49,0xa9,0x08,0x58,0xde,0xb4,0x2e,0xf1,0x92,0x4d,0x12,0x19,0xa3,0x25,0x2a,0xf1,0x95,0x44,0x4f};
    sm2_fp_from_bytes(a, a95);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c95, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a96[32] = {0xf1,0x1c,0x97,0x20,0xad,0xcc,0xf9,0x7d,0x4d,0x09,0xee,0x29,0xae,0xe0,0xef,0x71,0x18,0x1a,0x6f,0xc3,0x3c,0x73,0xf3,0x30,0x12,0x26,0xd8,0x13,0x25,0x4c,0x39,0x80};
    static std::uint8_t c96[32] = {0xe2,0x39,0x2e,0x42,0x5b,0x99,0xf2,0xfa,0x9a,0x13,0xdc,0x53,0x5d,0xc1,0xde,0xe2,0x30,0x34,0xdf,0x87,0x78,0xe7,0xe6,0x5f,0x24,0x4d,0xb0,0x26,0x4a,0x98,0x73,0x01};
    sm2_fp_from_bytes(a, a96);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c96, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a97[32] = {0x14,0x98,0x8e,0xa4,0xff,0xf5,0xfc,0xf3,0x5d,0xf1,0xbe,0x8a,0xea,0xaa,0x50,0xbc,0x94,0x3a,0x8b,0xb3,0xa4,0x09,0x98,0x0e,0x61,0xa8,0x04,0x83,0x64,0x05,0x61,0x89};
    static std::uint8_t c97[32] = {0x29,0x31,0x1d,0x49,0xff,0xeb,0xf9,0xe6,0xbb,0xe3,0x7d,0x15,0xd5,0x54,0xa1,0x79,0x28,0x75,0x17,0x67,0x48,0x13,0x30,0x1c,0xc3,0x50,0x09,0x06,0xc8,0x0a,0xc3,0x12};
    sm2_fp_from_bytes(a, a97);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c97, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a98[32] = {0x8c,0x8b,0x41,0x45,0x88,0xdb,0xc4,0x05,0xac,0xb7,0xed,0x09,0x9b,0x09,0xce,0x99,0xb6,0x3e,0x96,0xa1,0x9e,0x3b,0x7a,0x96,0xdd,0x56,0x76,0x37,0x2e,0xc6,0xa6,0xe3};
    static std::uint8_t c98[32] = {0x19,0x16,0x82,0x8c,0x11,0xb7,0x88,0x0b,0x59,0x6f,0xda,0x13,0x36,0x13,0x9d,0x33,0x6c,0x7d,0x2d,0x44,0x3c,0x76,0xf5,0x2c,0xba,0xac,0xec,0x6e,0x5d,0x8d,0x4d,0xc7};
    sm2_fp_from_bytes(a, a98);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c98, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }

    static std::uint8_t a99[32] = {0x0b,0xd1,0xb3,0x22,0x9d,0x04,0x18,0x78,0x67,0xd1,0x11,0xd6,0x1c,0x5a,0x37,0x11,0xd4,0x4a,0xf1,0x69,0xb8,0x22,0x45,0xe7,0x8c,0x9f,0x5c,0x9f,0x92,0x81,0xe8,0xdd};
    static std::uint8_t c99[32] = {0x17,0xa3,0x66,0x45,0x3a,0x08,0x30,0xf0,0xcf,0xa2,0x23,0xac,0x38,0xb4,0x6e,0x23,0xa8,0x95,0xe2,0xd3,0x70,0x44,0x8b,0xcf,0x19,0x3e,0xb9,0x3f,0x25,0x03,0xd1,0xba};
    sm2_fp_from_bytes(a, a99);
    sm2_fp_dbl(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c99, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_dbl");
    }
}